<template>
	<view>
		<u-popup v-model="show" mode="center" border-radius="20" length="80%" @close="popupClose">
			<view class="label u-p-30">
				<view>
					<u-input v-model="remark" :custom-style="customStyle" height="50" :clearable="false"></u-input>
				</view>
				<view class="remarkConfirm" @click="confirm">确定</view>
			</view>
		</u-popup>
	</view>
</template>

<script>
	export default {
		props: ['popupShow','userRemark'],
		data() {
			return {
				show: this.popupShow,
				customStyle: {
					background: '#F2F5FA',
					borderRadius: '20rpx',
					padding: '16rpx'
				},
				remark: ''
			}
		},
		watch: {
			popupShow: {
				handler(val) {
					this.show = val
				},
				deep: true
			},
			userRemark: {
				handler(val){
					this.remark = val
				},
				deep: true
			}
		},
		methods: {
			onChooseLabel(val) {
				this.$emit("onChooseLabel", val)
			},
			popupClose() {
				this.remark = ''
				this.$emit("popupClose")
			},
			confirm() {
				this.$emit("confirm", this.remark)
				this.remark = ''
			}
		}
	}
</script>

<style scoped>
	.remarkConfirm {
		background: #fb6316;
		color: #fff;
		border-radius: 10rpx;
		padding: 20rpx 30rpx;
		font-size: 30rpx;
		text-align: center;
		margin-top: 20rpx;
	}
</style>